package com.zjj.learn.javaplus.pkg01.demo14;

public class Student extends Person{

    private Integer score;

    public Student() {
    }

    public Student(String name, Integer age, Integer score) {
        super(name, age);
        this.score = score;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public void exam(){
        System.out.println(super.getName() + "同学，考试得了：" + this.getScore() + "分");
    }
}
